import { defineStore } from 'pinia';

export const useConversationStore = defineStore('conversation', {
  state: () => ({
    messages: [] as Array<{ role: 'user' | 'assistant'; content: string }>,
    currentRole: ''
  }),
  actions: {
    addMessage(message: { role: 'user' | 'assistant'; content: string }) {
      this.messages.push(message);
    },
    clearConversation() {
      this.messages = [];
    }
  }
});